
// #ifndef VUE3
import Vue from 'vue'
import App from './App'

import "@/static/jsencrypt.js";


import uView from '@/uni_modules/uview-ui'
Vue.use(uView)

import sView from '@/components/stec-ui'
Vue.use(sView)

//引入vuex
import store from "@/store/index"
Vue.prototype.$store=store

//引入config
import config from "@/config/index"
Vue.prototype.$config=config

Vue.config.productionTip = false

import navBar from "@/components/navBar/navBar"
Vue.component("navBar",navBar)

import record from "@/components/record"
Vue.component("record",record)

import message from "@/utils/message"
import { on, off, emit } from '@/utils/eventPool'
import _config from "@/config/path.js";
Vue.prototype.$message=message
Vue.prototype.$$on = on
Vue.prototype.$$off = off
Vue.prototype.$$emit = emit
Vue.prototype.PUB_KEY = _config.PUB_KEY;
Vue.prototype.$eventBus = new Vue();
// 时间戳转详细时间
Vue.prototype.$formatDate = function formatDate(date, formatType) {
        if(date === '' || date===null || date===undefined){
            return ''
        }
        const time = new Date(date);
        let year = time.getFullYear();
        let mouth = time.getMonth() + 1;
        let day = time.getDate();
        let hours = time.getHours() + 1;
        let minutes = time.getMinutes() + 1;
        let seconds = time.getSeconds();
        if (mouth < 10) {
            mouth = "0" + mouth
        }
        if (day < 10) {
            day = "0" + day
        }
        if (hours < 10) {
            hours = "0" + hours
        }
        if (minutes < 10) {
            minutes = "0" + minutes
        }
        if (seconds < 10) {
            seconds = "0" + seconds
        }
        return `${year}-${mouth}-${day} ${hours}:${minutes}:${seconds}`
    }

App.mpType = 'app'

// #ifdef MP-WEIXIN
wx.getSystemInfo({
  success: (result) => {
    console.log(result,'---90main.js');
    if (result.platform!=="devtools") {
      console.log = () => { } 
    }
  },
})
// #endif
const app = new Vue({
    ...App,
	store
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import App from './App.vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif
